<?php
require_once ("../db/connectdatabase.php");

function insertInfoNewMaub($id, $idtype, $tieude, $noidung) {
	$con = new ConnectDB();
	$tbl = "infonewobjectloan";
	$fn = array('nid' => $id, 'idobjectloan' => $idtype, 'ntitle' => $tieude, 'ncontent' => $noidung, 'datecreate' => time());
	return $con -> insert($tbl, $fn);
}

function updateInfoNewMaub($id, $tieude, $noidung) {
	$con = new ConnectDB();
	$tbl = "infonewobjectloan";
	$fn = array('ntitle' => $tieude, 'ncontent' => $noidung, 'datecreate' => time());
	$condition = array('nid' => $id);
	return $con -> update($tbl, $fn, $condition);
}
?>